export interface ACMColumnData {
  title?: string;
  width?: number;
  dataIndex?: string;
  slotName?: string;
  showTitle?: boolean;
}

export type TableRegister = (methods: TableMethods) => void;

export interface TableColumn<T = any> {
  type?: "checkbox" | "radio";
  title?: string;
  width?: number;
  dataIndex?: string;
  showTitle?: boolean;
  render?: (record: T) => Component;
}

export interface TableMethods {
  setTableData: (data: any[]) => void;
  setTableLoading: (isLoading: boolean) => void;
  setTableCheckboxVisible: (isShow: boolean) => void;
}

///////////////////////////////////
export interface TableRow {
  isChecked: boolean;
  rowData: any;
}

export interface TableRecord<T = any> {
  isChecked: boolean;
  rawRecord: T;
}

export interface TableContext {
  isShowCheckbox: Ref<boolean>;
  handleOnClickCheckbox: (rowKey: string | number) => void;
}
